import cgi
import datetime
import urllib
import webapp2

import jinja2
import os

dir = os.path.dirname(__file__)
filename = os.path.join(dir, '../view')
jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(filename))

from google.appengine.ext import db

from model.Person import Person
from model.User import User

class Main(webapp2.RequestHandler):
    def get(self):

        template = jinja_environment.get_template('main.html')
        self.response.out.write(template.render())

	#Preguntar si el fb_uid esta o no registrado, y mandarlo a registration.html o main.html
        # fb_uid = int(self.request.get('fb_uid'))
        # current_user = db.GqlQuery("SELECT * FROM User WHERE fb_uid IN :1", 1025747) 
        # if current_user:
        #     template = jinja_environment.get_template('registration.html')
        #     self.response.out.write(template.render())
        # else:
        #     template = jinja_environment.get_template('registration.html')
        #     self.response.out.write(template.render())

